package com.fg.room.pojo.DTO;

import com.fg.common.valid.AddStrategy;
import com.fg.common.valid.UpdateStrategy;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
/**
 * Created by kny on 2021/4/26 17:36
 */
@ApiModel(description = "设备报修Dto")
@Data
public class DeviceRepairDto {

    /**
     * 主键id
     */
    @NotNull(message = "id不能为空",groups = UpdateStrategy.class)
    private String id;

    @ApiModelProperty("device_info表id")
    @NotNull(message = "deviceId不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String deviceId;


    @ApiModelProperty("所属工地")
    @NotBlank(message = "所属工地不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String constructionSite;

    @ApiModelProperty("故障类型id")
    @NotBlank(message = "故障类型id不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String faultTypeId;

    @ApiModelProperty("检查时间")
    @NotNull(message = "检查时间不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private LocalDateTime checkTime;

    @ApiModelProperty("巡检人")
    @NotBlank(message = "巡检人不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String examiner;

    @ApiModelProperty("巡检人电话")
    @NotBlank(message = "巡检人电话不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String examinerPhone;

    @ApiModelProperty("问题描述")
    @NotBlank(message = "问题描述不能为空",groups = {AddStrategy.class,UpdateStrategy.class})
    private String problem;

    @ApiModelProperty("处理回复")
    private String handleAnswer;
}
